
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php

/*
echo "<pre>";
print_r($_POST);
echo "</pre>";
exit; 
*/
	include_once("../mysql.php");
	include_once("function_quantri.php");
	
	$idSP=$_POST['idSP'];	
	$idLoai=$_POST['LoaiSP'];
	$idCL=$_POST['ChungLoai'];
	$TenSP=$_POST['TenSP'];	
	$MoTa=$_POST['MoTa'];
	$Gia=$_POST['Gia'];
	$baiviet=$_POST['baiviet'];
	$SoLuongTon=$_POST['SoLuongTon'];
	$GhiChu=$_POST['GhiChu'];
	$New=$_POST['New'];
	
	$UrlHinh=$_POST['urlHinh'];
/*	move_uploaded_file($_FILES['urlHinh']['tmp_name'], '../upload/sanpham/hinhchinh/'.$UrlHinh);
	*/

	$result = UpdateSanPham($idSP,$TenSP, $idCL, $idLoai, $MoTa, $Gia, $UrlHinh, $baiviet, $SoLuongTon,$GhiChu, $New);
	if($result)
	{
		echo "Update thành công";

	}
	else 
	{
		echo "Update that bai".mysql_error();
	}
?>
